package com.zhanghu.builder;

/**
 * @Author: zhanghu
 * @Description:
 * @Date: Create in 10:29 2020/1/17
 * @modified by:
 */
public class Director {
    public static Computer create(AbstractBuilder builder) {
        builder.buildKeyboard();
        builder.buildMouse();
        builder.buildScreen();
        return builder.getComputer();
    }

    public static void main(String[] args) {
        System.out.println(Director.create(new ComputerBuilder(new Computer())));
    }
}
